You can add el_AjaxPostBack function in your add-ons.
This function exist in global.js file in:
/client/script/global.js
This function consists of 4 arguments as follows :
el_AjaxPostBack(obj, FetchScript, PostbackSectionId, Retrieved)
obj should be the value of this.
FetchScript is a boolean variable that, if its value is true, calls the scripts read by AJAX.
PostbackSectionId is a string that, if the name of an ID is written in the tags on the page, the returned value will be added as AJAX at the beginning of the tag.
Retrieved is a boolean variable that, if its value is true, replaces the tags inside the PostbackSectionId tag with the AJAX return value; If PostbackSectionId is not used, it will include the tag named div_PageLoad, and if this tag is missing, it will include the body tag of the HTML page.
Note: If the value use_retrieved=true exists in the querystring, the Retrieved variable will be activated.
The image below is an example of using this function in a button and sending it as AJAX.
Elanat is add-on oriented framework. Elanat is free and open-source ASP.NET Core CMS under license GPL V3. The Elanat kernel is designed to create an add-on for it as easily as possible; the Elanat kernel contains a variety of add-ons; the structure of Elanat allows the programmer to create a new web system containing different types of add-ons.
Download